﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
using System.Windows.Forms;

namespace ConfExpert.Forms.Depo
{
    public partial class MalKabuller : XForm
    {
        public MalKabuller()
        {
            InitializeComponent();
        }

        BindingSource bsGP, bsGPLines, bsRoll;
        private void MalKabulK_List_Load(object sender, EventArgs e)
        {
            bsGP = new BindingSource(ds, "GelisPartisi");
            bsGPLines = new BindingSource(bsGP, "FK_GelisPartisiLines_GelisPartisi_GelisPartisiId");
            bsRoll = new BindingSource(bsGPLines, "FK_Roll_GelisPartisiLines_GelisPartisiLinesId");

            InitGridView(gvGP, bsGP);
            InitGridView(gvGPLines, bsGPLines);
            InitGridView(gvRoll, bsRoll);

            gvGP.OptionsBehavior.Editable = gvGPLines.OptionsBehavior.Editable = gvRoll.OptionsBehavior.Editable = false;

            gvRoll.MakeColumnInvisible("CurrencyId", "UserId", "ModifiedOn", "RFIDset", "ProductId", "OwnerId", "GelisPartisiLinesId");

            gvGPLines.AddSummary("Qty", "LineTotal");
            gvRoll.AddSummary("Qty");

            splitContainerControl1.AutoSize();
            GetDetails("GelisPartisi;GelisPartisiLines;Roll", "GetGP2", 4);
        }
    }
}